scheduler: Implement yield for credit1
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Aug 2010 15:36:07 +0000 (16:36 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Aug 2010 15:36:07 +0000 (16:36 +0100)
commit5fc9f5ef6c083641b55ddcab8cb6a041656fb3bd
treeeed54fa9af843194907ba1dd1cb67bda2118a564
parent49094cac1b418fef528c3d3991230eccb4cdd513
scheduler: Implement yield for credit1

This patch implements 'yield' for credit1.  It does this by attempting
to put yielding vcpu behind a single lower-priority vcpu on the
runqueue.  If no lower-priority vcpus are in the queue, it will go at
the back (which if the queue is empty, will also be the front).

Runqueues are sorted every 30ms, so that's the longest this priority
inversion can happen.

For workloads with heavy concurrency hazard, and guest which implement
yield-on-spinlock, this patch significantly increases performance and
total system throughput.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit.c